package com.example.jdk_demo1;

import java.util.Observable;
import java.util.Observer;

public class ConcreteObserver implements Observer {

    /**
     *
     * @param o    具体的观察者类型
     * @param arg  观察目标 发送的消息内容
     */
    @Override
    public void update(Observable o, Object arg) {
        System.out.println("Observable has changed!");
        System.out.println("o = " + o);
        System.out.println("arg = " + arg);
    }
}
